Large Matrix Multiplication: DuckDB vs. SQLite |
您所在的位置:网站首页 › multiply by zero › Large Matrix Multiplication: DuckDB vs. SQLite |
On my laptop with 16 GB RAM, I would like to perform a matrix-vector multiplication with a sparse matrix of around 10 million columns and 2500 rows. The matrix has approximately only 2% non-zero entries, but this are still 500 million numbers and the column/row information, too large to work comfortably in-memory. A while ago, I tried using sqlite for this task. It kind of worked, but was too slow to be useful. This weekend, I revisited the problem and tried using duckdb. TLDR: duckdb is amazingly faster than sqlite for this problem, around 20 times. The matrix multiplication above takes around 20-30seconds. First, let鈥檚 build a small example and see if the approaches produce the right solution. set.seed(13) nvars |
CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3 |